package com.bindapp.model;

import android.annotation.SuppressLint;
import android.content.Context;
import android.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.webkit.WebChromeClient;
import android.webkit.WebViewClient;

import com.bindapp.R;
import com.bindapp.databinding.FragmentMaintab3Binding;
import com.bindapp.util.Static;

/**
 * Created by tom055 on 2018/6/3.
 */

public class Tab3Model extends BaseModel {
    private FragmentMaintab3Binding binding;

    @SuppressLint("JavascriptInterface")
    public Tab3Model(Context context){
        super(context);
        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.fragment_maintab3,null,false);
        binding.webview.getSettings().setJavaScriptEnabled(true);
        binding.webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        binding.webview.getSettings().setSupportMultipleWindows(true);
        binding.webview.setWebViewClient(new WebViewClient());
        binding.webview.setWebChromeClient(new WebChromeClient());
        binding.webview.loadUrl(Static.TaoBao);
    }

    @Override
    public FragmentMaintab3Binding getBinding(){
        return binding;
    }



}
